-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[

]]--
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local assets =
{
    Asset("ANIM", "anim/loramia_item_wings_of_universe.zip"),
    Asset( "IMAGE", "images/inventoryimages/loramia_item_wings_of_universe.tex" ),
    Asset( "ATLAS", "images/inventoryimages/loramia_item_wings_of_universe.xml" ),
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local function onequip(inst, owner)
    owner:PushEvent("loramia_event.wings_of_universe_onequip",inst)
end

local function onunequip(inst, owner)
    owner:PushEvent("loramia_event.wings_of_universe_unequip",inst)
end

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("loramia_item_wings_of_universe")
    inst.AnimState:SetBuild("loramia_item_wings_of_universe")
    inst.AnimState:PlayAnimation("anim")

    inst:AddTag("loramia_item_wings_of_universe")
    

    MakeInventoryFloatable(inst)

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    inst:AddComponent("inspectable")
    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.imagename = "loramia_item_wings_of_universe"
    inst.components.inventoryitem.atlasname = "images/inventoryimages/loramia_item_wings_of_universe.xml"
    MakeSmallBurnable(inst, TUNING.SMALL_BURNTIME)
    MakeSmallPropagator(inst)
    ---------------------------------------------------------------------------------------------------
    --- 可装备
        inst:AddComponent("equippable")
        inst.components.equippable.equipslot = EQUIPSLOTS.BODY
        inst.components.equippable.restrictedtag = "loramia"
        inst.components.equippable:SetOnEquip(onequip)
        inst.components.equippable:SetOnUnequip(onunequip)        
        inst:ListenForEvent("unequipped",inst.Remove)
    ---------------------------------------------------------------------------------------------------
    MakeHauntableLaunch(inst)

    return inst
end

return Prefab("loramia_item_wings_of_universe", fn, assets)
